<template>
	<view>
		asdasdase2qeq2e
		<!-- 瀑布流 -->
		<WaterFall v-if="flag" :list="list" ></WaterFall>
	</view>
</template>

<script>
	import WaterFall from '@/components/water-fall/water-fall.vue'
	export default {
		components:{
			WaterFall
		},
		data () {
			return {
				flag: true,
				list: [{
						img: "../../static/sprt_images/life_three.png"
					},
					{
						img: "../../static/sprt_images/life_four.png"
					},
					{
						img: "../../static/sprt_images/life_five.png"
					},{
						img: "../../static/sprt_images/life_one.png"
					},
					{
						img: "../../static/sprt_images/life_two.png"
					},
					], 
			}
		},
		onLoad() {
			
		},
		methods: {
			// 选中
			choose:function(e) {
					console.log(e)
					// item 返回选中 JSON 对象
					//console.log(item)
					let openid = uni.getStorageSync('openid')
					if (openid.length == 0)
					this.$uniLogin.getUserProfile()
					//跳转到详情页
					uni.navigateTo({
						url: "/pages/detail_page/index",
						success: function(res) {
						    // 通过eventChannel向被打开页面传送数据
						    res.eventChannel.emit('acceptDataFromOpenerPage', { data: e })
						  }
					})
			},
			
		}
	}
</script>

<style scoped>
	image {
		display: block;
		will-change: transform;
	}
	.waterfall-flow {
		position: relative;
		background-color: #ffffff;
	}
	/* 为了初始化，还为定位上，加上这个 */
	.item {
		width: 375rpx;
		position: absolute;
		top: -375rpx;
		left: -375rpx;
		background-color: white;
	}
	.box {
		margin: 10rpx;
		box-shadow: 10rpx 10rpx 10rpx #ccc;
		overflow: hidden;
		border-radius: 20rpx;
		padding: 0;
		background-color: #ffffff;
	}
	.user {
		display: flex;
		align-items: center;
		padding: 10rpx;
	}
	.content {
		font-size: 32rpx;
		padding: 20rpx 10rpx 0 10rpx;
		color: #333;
	}
</style>
